import http,pdb
from http import server
class MyHandler(server.BaseHTTPRequestHandler):
    def do_GET(self):
        self.send_response(http.HTTPStatus.OK)
        self.send_header("Content-type","html")
        self.end_headers()
        with open('test.html','rb') as htmlfile:
            self.wfile.write(htmlfile.read())
        return

def run(server_class=server.HTTPServer,handler_class=MyHandler):
    server_addr=('',8080)
    httpd=server_class(server_addr,handler_class)
    httpd.serve_forever()

if __name__=='__main__':
    run()

